<!doctype html>
<html>
<head>
<title>Download Filename Controller</title>
<script src="options.js"></script>
</head>
<body>
<table id=rules></table>
<button id=new>New Rule</button>
<table hidden>
<tr id=rule-template hidden>
  <td class=nowrap><button class=move-up>&uarr;</button>
    <button class=move-down>&darr;</button></td>
  <td>
    <select class=matcher>
      <option value=hostname>Hostname</option>
      <option value=url-regex>URL RegExp</option>
      <option value=default>Default Filename</option>
      <option value=default-regex>Default Filename RegExp</option>
      <option value=js>Javascript</option>
    </select>
    <input type=text class=match-param>
    <select class=action>
      <option value=overwrite>Overwrite default filename</option>
      <option value=prompt>Prompt if default filename exists</option>
      <option value=js>Javascript</option>
    </select>
    <textarea class=action-js rows=5 cols=83>console.log(item.url)
console.log(item.filename)
// http://developer.chrome.com/extensions/downloads.html#type-DownloadItem
// http://developer.chrome.com/extensions/downloads.html#type-FilenameConflictAction
suggest('hello.txt', 'overwrite')</textarea></td>
  <td><span class=nowrap><input type=checkbox class=enabled checked>
      <label class=enabled-label>Enabled</label></span>
    <button class=remove>Remove</button></td>
</tr>
</table>
</body>
</html>
